﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.BootConfigData
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System;
using System.Runtime.CompilerServices;
using UnityEngine.Bindings;
using UnityEngine.Scripting;

#nullable disable
namespace UnityEngine
{
  [NativeHeader("Runtime/Export/Bootstrap/BootConfig.bindings.h")]
  internal class BootConfigData
  {
    private IntPtr m_Ptr;

    public void AddKey(string key) => this.Append(key, (string) null);

    public string Get(string key) => this.GetValue(key, 0);

    public string Get(string key, int index) => this.GetValue(key, index);

    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern void Append(string key, string value);

    [MethodImpl(MethodImplOptions.InternalCall)]
    public extern void Set(string key, string value);

    [MethodImpl(MethodImplOptions.InternalCall)]
    private extern string GetValue(string key, int index);

    [RequiredByNativeCode]
    private static BootConfigData WrapBootConfigData(IntPtr nativeHandle)
    {
      return new BootConfigData(nativeHandle);
    }

    private BootConfigData(IntPtr nativeHandle)
    {
      this.m_Ptr = !(nativeHandle == IntPtr.Zero) ? nativeHandle : throw new ArgumentException("native handle can not be null");
    }
  }
}
